package start.spring.basic.report.entity;

import java.util.Date;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import start.spring.basic.ry.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;


/**
 * 模板设计对象 report_templete_design
 * 
 * @author xyy
 * @date 2023-12-27
 */
@Data
@TableName("report_templete_design")
@ApiModel(value="report_templete_design表映射对象", description="")
public class ReportTempleteDesign implements Serializable {
	
	private static final long serialVersionUID = 4738367108380883706L;

	@ApiModelProperty(value = "逻辑主键id")
	@TableId(value = "templete_id", type = IdType.ASSIGN_ID)
    private Long templeteId;

    @ApiModelProperty(value = "报表名称")
    @TableField("templete_name")
    @Excel(name = "报表名称")
    private String templeteName;

    @ApiModelProperty(value = "创建人id")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "创建人账号")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "创建人名称")
    @TableField("nick_name")
    @Excel(name = "创建人名称")
    private String nickName;

    @ApiModelProperty(value = "模板内容")
    @TableField("templete_content")
    private String templeteContent;

    @ApiModelProperty(value = "模板与数据库映射关系")
    @TableField("templete_dbmap")
    private String templeteDbmap;

    @ApiModelProperty(value = "模板受保护单元格配置")
    @TableField("templete_protect")
    private String templeteProtect;
    
    @ApiModelProperty(value = "单元格与系统扩展插件对应关系")
    @TableField("templete_cellrelation")
    private String templeteCellrelation;
    
    @ApiModelProperty(value = "发布标志")
    @TableField("release_flag")
    @Excel(name = "发布标志", readConverterExp = "N=未发布,Y=已发布")
    private String releaseFlag;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createTime;
    
    @ApiModelProperty(value = "创建时间起")
    @TableField(exist=false)
    private String beginCreateTime;
    
    @ApiModelProperty(value = "创建时间止")
    @TableField(exist=false)
    private String endCreateTime;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date updateTime;
    
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("templeteId", getTempleteId())
            .append("templeteName", getTempleteName())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("nickName", getNickName())
            .append("templeteContent", getTempleteContent())
            .append("templeteDbmap", getTempleteDbmap())
            .append("templeteProtect", getTempleteProtect())
            .append("templeteCellrelation", getTempleteCellrelation())
            .append("releaseFlag", getReleaseFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
